#ifndef LCD_H
#define LCD_H

#include "stm32f4xx.h"
#include "delay.h"
#include "string.h"


#define FLASH_ZIKU_ADDR(x)    ((x)*64*1024)
#define ZIKU_BASE_ADDR        FLASH_ZIKU_ADDR(100)
#define ASC16_BASE_ADDR       (ZIKU_BASE_ADDR + 0X00000000)
#define HZK16_BASE_ADDR       (ZIKU_BASE_ADDR + 0X00000806)
#define ASC32_BASE_ADDR       (ZIKU_BASE_ADDR + 0X0004064C)
#define HZK32_BASE_ADDR       (ZIKU_BASE_ADDR + 0X00042652)


#define LCD_BL_H     GPIO_WriteBit(GPIOA, GPIO_Pin_15, Bit_SET)
#define LCD_BL_L     GPIO_WriteBit(GPIOA, GPIO_Pin_15, Bit_RESET)
#define LCD_CS_H     GPIO_WriteBit(GPIOB, GPIO_Pin_4, Bit_SET)
#define LCD_CS_L     GPIO_WriteBit(GPIOB, GPIO_Pin_4, Bit_RESET)
#define LCD_DC_H     GPIO_WriteBit(GPIOD, GPIO_Pin_2, Bit_SET)
#define LCD_DC_L     GPIO_WriteBit(GPIOD, GPIO_Pin_2, Bit_RESET)


void LCD_Init(void);
void LCD_Port_Init(void);
void LCD_Display_Point(u8 xs,u8 ys,u16 color);
void LCD_Fill(u8 xs,u8 ys,u8 xe,u8 ye,u16 color);
u8 LCD_Display_Pic(u8 xs,u8 ys,u8 *Buff);
void LCD_Display_ASCII(u8 xs,u8 ys,u8 size,u16 color,u8 *Buff);
void LCD_Display_GB2312(u8 xs,u8 ys,u8 size,u16 color,u8 *Buff);
void LCD_Display_Str(u8 xs,u8 ys,u8 size,u16 color,u8 *Buff);
void LCD_Display_Str_Flash(u8 xs,u8 ys,u8 size,u16 color,u8 *Buff);


#endif


